﻿/**
 * 
 */

Ext.Button.prototype.initComponent = Ext.Button.prototype.initComponent.createInterceptor(function(){
    if (this.menu){
        this.menu.ownerCt = this;
    }
}); 
 

Ext.ns('Financo');

Financo.panels = {
    TRANSACTION			: 'transaction'
    ,CATEGORIES			: 'categories'
    ,GRAPHICS			: 'graphics'
    ,CATEGORY_EVOLUTION	: 'catevolution'
    ,EVOLUTIONS			: 'evolutions'
    ,CATEGORIESCHART	: 'categorieschart'
    ,BALANCE			: 'balance'
};

Financo.url = {
	CATEGORY		: '/financo/category/crud'
	,TRANSACTION	: '/financo/transaction/crud'
};

Financo.transformRGB = function(hexCode) {
	var color = new String(hexCode).replace('#','').split('');	
	
	var rgb = {};
	
	rgb.r = parseInt(color[0] + color[1], 16);
	rgb.g = parseInt(color[2] + color[3], 16);
	rgb.b = parseInt(color[4] + color[5], 16);
	
	return rgb;
};